<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    
</head>
<body>
    <script>
    
    window.onload= function(){
        var a=document.getElementsByTagName('input');
        a[3].onclick = function(){
            var r=Number(a[0].value);
            a[1].value=2*Math.PI*r;
            a[2].value=Math.PI*r*r;
        }
        a[4].onclick = function(){
            a[0].value="";
            a[1].value="";
            a[2].value="";
        }
    }
    alert('确定登录本网页吗')
    </script>
    <h3>求圆的周长和面积</h3>
    <span>半径</span><input style="border-radius: 3px" type="text" placeholder="求输入圆的半径"><br>
    <span>周长</span><input style="border-radius: 3px" type="text" placeholder="0"><br>
    <span>面积</span><input style="border-radius: 3px" type="text" placeholder="0"><br>
    <input type="button" value="确定">
    <input type="button" value="重置">


</body>
</html>